home *** CD-ROM | disk | FTP | other *** search
- #
- # This script creates a makefile for A++ to be executed
- # with GNU Make and the GNU/C++ Development System.
- #
-
- # open the output file
- echo "Creating GNU 'makefile'.."
- rm makefile
- open makefile w 1
-
- echo "#"^j\
- "# GNU Makefile for the A++ Library"^j\
- "# Copyright (C) by Armin Vogt"^j\
- "#"^j\
- "# This makefile has been created automatically with 'makegnu'"^j\
- "# "$Id: makegnu,v 1.2 1994/08/02 18:58:47 Armin_Vogt Exp Armin_Vogt $^j\
- "#"^j^j\
- "VPATH = /apphome/libsource"^j\
- "INCDIR = /appinclude"^j\
- "APPHEADER = /appinclude/APlusPlus"^j\
- ^j"#"^j"# if the Commodore® headers are not present in gcc:os-include"^j\
- "# define their path here.."^j\
- "CHEADERS = /include"^j\
- ""^j\
- ""^j\
- "CC = gcc"^j\
- "CFLAGS = -O2"^j\
- "AR = ar"^j\
- "RANLIB = ranlib"^j\
- ^j\
- "LIBRARYFILE = libaplusplus.a"^j^j\
- "ERRORPIPE = pipe:gnu_errors"^j\
- ""^j >.1
-
-
- alias ALL "*p%c exec set p $p; foreach s ( $p ) $c"
-
- echo "Making object lists.."
- #
- # create object list: all files present in the libsource directory
- # are included.
- #
- echo "OBJS = \\" >.1
- cd apphome:libsource
- unset file
- ALL *.cxx "strhead file .cxx $s;echo \" \"$file.o\\\\" >.1
- echo ^j^j >.1
- dswap
-
- #
- # IMPORTANT NOTE: GNU Make demands a tab character leading each
- # action line!! '^i' prints a tab.
- #
-
- echo ".SUFFIXES: .o .c .cxx"^j >.1
- echo ".cxx.o:"^j\
- ^i"$(CC) -c -I/gcc/include -I$(INCDIR) -I$(CHEADERS) $(CFLAGS) $< >$(ERRORPIPE)"^j >.1
-
- echo ^j"# The order of include directory declarations in crucial when"^j\
- "# CHEADERS is used. GNU standard headers must have a higher priority"^j\
- "# than the ones in the CHEADERS (usually SAS standard headers!!)"^j >.1
-
- echo "all : $(LIBRARYFILE)"^j^j\
- "$(LIBRARYFILE): $(OBJS)"^j\
- ^i"$(AR) crv $(LIBRARYFILE) $?"^j\
- ^i"$(RANLIB) $(LIBRARYFILE)"^j >.1
-
-
-
- #
- # create object's source and header dependencies: for each files
- # present in the header directories a dependency is created.
- # Even if the header does not correspond to a source file,
- # that doesn't matter since only source files are included into
- # the objects list.
- #
-
- echo "Making A++ source dependencies.."
-
- echo ^j^j"#"^j"# A++ dependencies"^j"#"^j >.1
- cd appinclude:APlusPlus
- unset file
- unset name
- ALL */*.h "strhead file .h $s;strtail name / $file;echo "$name.o: $name.cxx "\"$\""(APPHEADER)/$file.h"^j;" >.1
- dswap
-
- # close created output file
- close 1
- echo "done."
-